package ch.gibb.javamvc;

import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: Bernard
 * Date: 27.02.13
 * Time: 07:15
 * To change this template use File | Settings | File Templates.
 */
public class WebPageBean {
    private String id;
    private String url;
    private ActionInterface action;
    private String template;
    private Map<Integer, String> viewPaths;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        WebPageBean that = (WebPageBean) o;

        if (url != null ? !url.equals(that.url) : that.url != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return url != null ? url.hashCode() : 0;
    }

    @Override
    public String toString() {
        return "WebPageBean{" +
                "id='" + id + '\'' +
                ", url='" + url + '\'' +
                ", action=" + action +
                ", template='" + template + '\'' +
                ", viewPaths=" + viewPaths +
                '}';
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getTemplate() {
        return template;
    }

    public void setTemplate(String template) {
        this.template = template;
    }

    public ActionInterface getAction() {
        return action;
    }

    public void setAction(ActionInterface action) {
        this.action = action;
    }

    public Map<Integer, String> getViewPaths() {
        return viewPaths;
    }

    public void setViewPaths(Map<Integer, String> viewPaths) {
        this.viewPaths = viewPaths;
    }
}
